import {createRouter, createWebHistory} from "vue-router";
import App from "../App";
const history =createWebHistory()
const router = createRouter({
    history,
    routes: [
        {
            path: '/ysLogin',
            name: 'ysLogin',
            component: () => import('../views/ysLogin')
        },
        {
            path: '/',
            name: 'app',
            component: App,
            redirect: '/ysLogin',
            children: [
                {
                    path: '/ysLogin',
                    name: 'ysLogin',
                    component: () => import('../views/ysLogin')
                },
                {
                    path: '/shopIndex',
                    name: 'shopIndex',
                    component: () => import('../views/shopIndex')
                },
                {
                    path: '/ysregister',
                    name: 'ysregister',
                    component: () => import('../views/ysregister')
                },
                {
                    path: '/forgetPassword',
                    name: 'forgetPassword',
                    component: () => import('../views/forgetPassword')
                },
                {
                    path: '/search',
                    name: 'search',
                    component: () => import('../views/search')
                },
                {
                    path: '/shopCart',
                    name: 'shopCart',
                    component: () => import('../views/shopCart')
                },
                {
                    path: '/introductionShop',
                    name: 'introductionShop',
                    component: () => import('../views/introductionShop')
                },
                {
                    path:'/OnwerIndex',
                    name:'OnwerIndex',
                    component:()=>import('../views/OnwerIndex')
                },
                {
                    path:'payForShop',
                    name:'payForShop',
                    component:()=>import('../views/payForShop')
                },
                {
                    path:'payForOrder',
                    name:'payForOrder',
                    component:()=>import('../views/payForOrder')
                },
                {
                    path:'collectionShop',
                    name:'collectionShop',
                    component:()=>import('../views/collectionShop')
                }
            ]
        }
    ]
})


export default router